package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the User table.
 */
public class UserPkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -5109289981785580986L;

	protected int idUser;

	/** 
	 * This attribute represents whether the primitive attribute idUser is null.
	 */
	protected boolean idUserNull;

	/** 
	 * Sets the value of idUser
	 */
	public void setIdUser(int idUser)
	{
		this.idUser = idUser;
	}

	/** 
	 * Gets the value of idUser
	 */
	public int getIdUser()
	{
		return idUser;
	}

	/**
	 * Method 'UserPk'
	 * 
	 */
	public UserPkDTO()
	{
	}

	/**
	 * Method 'UserPk'
	 * 
	 * @param idUser
	 */
	public UserPkDTO(final int idUser)
	{
		this.idUser = idUser;
	}

	/** 
	 * Sets the value of idUserNull
	 */
	public void setIdUserNull(boolean idUserNull)
	{
		this.idUserNull = idUserNull;
	}

	/** 
	 * Gets the value of idUserNull
	 */
	public boolean isIdUserNull()
	{
		return idUserNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof UserPkDTO)) {
			return false;
		}
		
		final UserPkDTO _cast = (UserPkDTO) _other;
		if (idUser != _cast.idUser) {
			return false;
		}
		
		if (idUserNull != _cast.idUserNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idUser;
		_hashCode = 29 * _hashCode + (idUserNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.UserPk: " );
		ret.append( "idUser=" + idUser );
		return ret.toString();
	}

}
